<?php
declare (strict_types = 1);

namespace app\admin\controller;

use app\admin\model\Gcategory;
use think\facade\Db;
use think\facade\Request;
use think\facade\View;

class Cate
{
    public function cate()
    {
        $id=Request::get("id",'','trim,htmlspecialchars,strip_tags');

        $data = [
            'id'=>$id
        ];

        $rt=Gcategory::test();
        $list=Gcategory::jie($data);
        $arr=[];
        foreach($rt as $v){
            $arr[]=$v['parent_id'];
        }
        View::assign('rt',$arr);




        return View::fetch('',['data'=>$data,'list'=>$list]);
    }


}